package com.buddy.learn.elasticsearch.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author Buddy
 * @date 2021/4/25
 */

//@Document(indexName = "test_data1" )
@Document(indexName = "ise_db_03" )
public class TestData {

    @Id
    private Integer idx;
    @Field(type = FieldType.Integer)
    private Integer col1;
    @Field(type = FieldType.Integer)
    private Integer col2;
    @Field(type = FieldType.Float)
    private Float col3;

    public Integer getIdx() {
        return idx;
    }

    public void setIdx(Integer idx) {
        this.idx = idx;
    }

    public Integer getCol1() {
        return col1;
    }

    public void setCol1(Integer col1) {
        this.col1 = col1;
    }

    public Integer getCol2() {
        return col2;
    }

    public void setCol2(Integer col2) {
        this.col2 = col2;
    }

    public Float getCol3() {
        return col3;
    }

    public void setCol3(Float col3) {
        this.col3 = col3;
    }

    public TestData() {
    }

    public TestData(Integer idx, Integer col1, Integer col2, Float col3) {
        this.idx = idx;
        this.col1 = col1;
        this.col2 = col2;
        this.col3 = col3;
    }

    @Override
    public String toString() {
        return "TestData{" +
                "idx=" + idx +
                ", col1=" + col1 +
                ", col2=" + col2 +
                ", col3=" + col3 +
                '}';
    }
}
